Improving Determinization of Grammar Programs for Program Inversion
نویسندگان
چکیده
The inversion method proposed by Glück and Kawabe uses grammar programs as intermediate results that comprise sequences of operations (data generation, matching, etc.). The determinization method used in the inversion method fails for a grammar program of which the collection of item sets causes a conflict even if there exists a deterministic program equivalent to the grammar program. In this paper, by ignoring shift/shift conflicts, we improve the determinization method so as to cover grammar programs causing shift/shift conflicts. Moreover, we propose a method to eliminate infeasible definitions from unfolded grammar programs and show that the method succeeds in determinizing some grammar programs for which the original method fails. By using the method as a post-process of the original inversion method, we make the original method strictly more powerful.
منابع مشابه
A Grammar-Based Approach to Invertible Programs
Program inversion has many applications such as in the implementation of serialization/deserialization and in providing support for redo/undo, and has been studied by many researchers. However, little attention has been paid to two problems: how to characterize programs that are easy or hard to invert and whether, for each class of programs, efficient inverses can be obtained. In this paper, we...
متن کاملDerivation of Deterministic Inverse Programs Based on LR Parsing
We present a method for automatic program inversion of functional programs based on methods of LR parsing. We formalize the transformation and illustrate it with the inversion of a program for runlength encoding. We solve one of the main problems of automatic program inversion—the elimination of nondeterminism—by viewing an inverse program as a context-free grammar and applying to it methods of...
متن کاملThe Effect of Multimedia-Based Instruction on Improving Iranian EFL Learners’ Grammar Knowledge and their Attitudes
Applying technologies has recently caused language education to undertake influential modifications. Hence, this study tried to investigate the impact of using technology in form of multimedia on improving grammar knowledge of Iranian high school students and also examined their attitudes toward multimedia-based mode of instruction. To do so, three intact classes of lower intermediate students ...
متن کاملA Graph Grammar Approach for Durational Action Timed Automata Determinization
Durational Action Timed Automata (DATA) is a semantic model for expressing the behavior of real time systems where actions have durations. In this paper, we propose an approach for translating a DATA structure to a corresponding deterministic one. For this purpose, a meta-model of DATA model and a transformation grammar are defined. Programs are written in Python language and implemented under ...
متن کاملProgram Inversion for Tail Recursive Functions
Program inversion is a fundamental problem that has been addressed in many different programming settings and applications. In the context of term rewriting, several methods already exist for computing the inverse of an injective function. These methods, however, usually return non-terminating inverted functions when the considered function is tail recursive. In this paper, we propose a direct ...
متن کامل